<h3><B>结算管理</B></h3>
<br>
<form class="form-inline">
    <div class="form-group">
        <label>商家名称</label>
        <input type="text" class="form-control" ng-model="opt.retailer_name">
    </div>
    <div class="form-group">
        <label>66编号</label>
        <input type="text" class="form-control" ng-model="opt.code">
    </div>
    <div class="form-group">
        <label>交易日期范围</label>
        <input type="text" id="startDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd"
                >
        <label>到</label>
        <input type="text" id="endDate" class="form-control datepicker" size="12" data-date-format="yyyy-mm-dd"
                ></div>
    <button type="submit" class="btn btn-default" ng-click="getRetailerSettlement(opt)">检索</button>
</form>
<br>
<br>
<div class="tab-content">
    <div class="tab-pane active" id="tab_a">
        <table class="table table-condensed">
            <thead>
            <tr>
                <th>商家名称</th>
                <th>66编号</th>
                <th>币面总金额</th>
                <th>币面总结算金额</th>
                <th>商家总奖励金额</th>
                <th>合计总结算金额</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="settlement in settlementList">
                <th>{{settlement.retailer_name}}</th>
                <th>{{settlement.code}}</th>
                <th>{{settlement.value}}</th>
                <th>{{settlement.deal}}</th>
                <th>{{settlement.price}}</th>
                <th>{{settlement.deal + settlement.price}}</th>
                <th><a class="btn btn-secondary btn-xs"
                       ng-click="setId(settlement.id)">结算</a>

                </th>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="modal fade" id="settleModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h5 class="modal-title" id="myModalLabel">结算日期：</h5>
            </div>
            <div class="modal-body">
                <input type="text" id="settleDate" class="form-control datepicker" size="12"
                       data-date-format="yyyy-mm-dd" required>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary btn-sm"
                        ng-click="saveBalance()">确认
                </button>
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭
                </button>
            </div>
        </div>
    </div>
</div>
